//
//  MYGImagesLayoutCell.swift
//  MYDoctor
//
//  Created by Denny on 2024/5/6.
//

import UIKit

class MYGImagesLayoutCell: UICollectionViewCell {
    @IBOutlet weak var bView: UIView!
    
    @IBOutlet weak var titleLB: UILabel!
    @IBOutlet weak var icon: UIImageView!
    @IBOutlet weak var selectedIcon: UIImageView!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    var model: ImagesModel = ImagesModel() {
        didSet {
            self.titleLB.text = model.title
            self.icon.image = UIImage.init(named: model.iconString)
            self.selectedIcon.isHidden = !model.selected
            bView.backgroundColor = model.selected ? UIColor.init(hexString: "#F0F5FF") :  UIColor.init(hexString: "#F8F8F8")
        }
    }
}
